%%
%% This is file `zref-pagelayout.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% zref.dtx  (with options: `pagelayout')
%% 
%% This is a generated file.
%% 
%% Project: zref
%% Version: 2020-07-03 v2.32
%% 
%% Copyright (C)
%%   2006-2012 Heiko Oberdiek
%%   2016-2020 Oberdiek Package Support Group
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
%%    https://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% The Current Maintainers of this work are
%% Heiko Oberdiek and the Oberdiek Package Support Group
%% https://github.com/ho-tex/zref/issues
%% 
%% 
%% This work consists of the main source file zref.dtx
%% and the derived files
%%    zref.sty, zref.pdf, zref.ins, zref.drv, zref-base.sty,
%%    zref-abspage.sty, zref-abspos.sty, zref-counter.sty,
%%    zref-dotfill.sty, zref-env.sty, zref-hyperref.sty,
%%    zref-lastpage.sty, zref-marks.sty, zref-nextpage.sty,
%%    zref-pageattr.sty, zref-pagelayout.sty, zref-perpage.sty,
%%    zref-runs.sty, zref-savepos.sty, zref-thepage.sty,
%%    zref-titleref.sty, zref-totpages.sty, zref-user.sty,
%%    zref-xr.sty, zref-example.tex, zref-example-lastpage.tex,
%%    zref-example-nextpage.tex, zref-test1.tex,
%%    zref-test-base.tex, zref-test-runs.tex,
%%    zref-test-titleref-memoir.tex.
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pagelayout}%
  [2020-07-03 v2.32 Module pagelayout for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
  \expandafter\endinput
\fi
\RequirePackage{zref-thepage}[2019/11/29]
\RequirePackage{iftex}[2019/11/07]%
\RequirePackage{atveryend}[2010/03/24]
\def\ZREF@temp#1{%
  \begingroup
    \escapechar=-1 %
  \ltx@ifundefined{\string#1}{\endgroup}{%
    \edef\x{%
      \endgroup
      \noexpand\zref@newprop*{\string#1}%
                             [\noexpand\number\noexpand#1]% hash-ok
                             {\noexpand\number\noexpand#1}%
      \noexpand\zref@addprop{thepage}{\string#1}%
    }%
    \x
  }%
}
\ZREF@temp\mag
\ZREF@temp\paperwidth
\ZREF@temp\paperheight
\ZREF@temp\stockwidth % memoir.cls, crop.sty
\ZREF@temp\stockheight % memoir.cls, crop.sty
\ZREF@temp\mediawidth % VTeX
\ZREF@temp\mediaheight % VTeX
\ifluatex
\zref@newprop*{pdfvorigin}%
                             [\number\pdfvariable vorigin]% hash-ok
                             {\number\pdfvariable vorigin}%
\zref@addprop{thepage}{pdfvorigin}
\zref@newprop*{pdfhorigin}%
                             [\number\pdfvariable horigin]% hash-ok
                             {\number\pdfvariable horigin}%
\zref@addprop{thepage}{pdfhorigin}
\zref@newprop*{pdfpageheight}%
                             [\number\pageheight]% hash-ok
                             {\number\pageheight}%
\zref@addprop{thepage}{pdfpageheight}
\zref@newprop*{pdfpagewidth}%
                             [\number\pagewidth]% hash-ok
                             {\number\pagewidth}%
\zref@addprop{thepage}{pdfpagewidth}
\else
\ZREF@temp\pdfpagewidth
\ZREF@temp\pdfpageheight
\ZREF@temp\pdfhorigin
\ZREF@temp\pdfvorigin
\fi
\ZREF@temp\hoffset
\ZREF@temp\voffset
\ZREF@temp\topmargin
\ZREF@temp\oddsidemargin
\ZREF@temp\evensidemargin
\ZREF@temp\textwidth
\ZREF@temp\textheight
\ZREF@temp\headheight
\ZREF@temp\headsep
\ZREF@temp\footskip
\ZREF@temp\marginparwidth
\ZREF@temp\marginparsep
\ZREF@temp\columnwidth
\ZREF@temp\columnsep
\ZREF@temp\trimedge % memoir.cls
\ZREF@temp\spinemargin % memoir.cls
\ZREF@temp\foremargin % memoir.cls
\ZREF@temp\trimtop % memoir.cls
\ZREF@temp\uppermargin % memoir.cls
\ZREF@temp\headmargin % memoir.cls
\IfFormatAtLeastTF{2020/10/01}
 {
   \zref@newprop*{outputboxwd}[0pt]{\ShipoutBoxWidth}
   \zref@newprop*{outputboxht}[0pt]{\ShipoutBoxHeight}
   \zref@newprop*{outputboxdp}[0pt]{\ShipoutBoxDepth}
 }
 {
   \zref@newprop*{outputboxwd}[0pt]{\AtBeginShipoutBoxWidth}
   \zref@newprop*{outputboxht}[0pt]{\AtBeginShipoutBoxHeight}
   \zref@newprop*{outputboxdp}[0pt]{\AtBeginShipoutBoxDepth}
 }
\zref@addprops{thepage}{outputboxwd,outputboxht,outputboxdp}
\ltx@newif\ifZREF@pl@list
\ZREF@IfDefinable\zlistpagelayout\def{%
  {\global\ZREF@pl@listtrue}%
}
\def\ZREF@pl@AfterLastShipout{%
  \ifZREF@pl@list
    \edef\ZREF@page@max{\the\value{abspage}}%
    \ltx@ifundefined{ZREF@org@testdef}{%
      \let\ZREF@org@testdef\@testdef
      \def\@testdef##1##2##3{%
        \ZREF@org@testdef{##1}{##2}{##3}%
        \def\ZREF@temp{##1}%
        \ifx\ZREF@temp\ZREF@RefPrefix
          \expandafter\gdef\csname##1@##2\endcsname{##3}%
        \fi
      }%
    }{}%
    \AtVeryEndDocument{\ZREF@pl@AtVeryEnd}%
  \fi
}
\def\ZREF@pl@AtVeryEnd{%
  \begingroup
    \toks@{Page layout parameters:\MessageBreak}%
    \count@=1 %
    \ZREF@pl@ListPage
    \edef\x{\endgroup
      \noexpand\@PackageInfoNoLine{zref-pagelayout}{\the\toks@}%
    }%
  \x
}
\def\ZREF@pl@ListPage{%
  \edef\x{%
    \toks@={%
      \the\toks@
      Page \the\count@:\noexpand\MessageBreak
      \zref@ifrefundefined{thepage\the\count@}{}{%
        \ltx@space\ltx@space mag = %
        \zref@extract{thepage\the\count@}{mag}%
        \noexpand\MessageBreak
        \ZREF@pl@ListEntry{paperwidth}%
        \ZREF@pl@ListEntry{paperheight}%
        \ZREF@pl@ListEntry{stockwidth}%
        \ZREF@pl@ListEntry{stockheight}%
        \ZREF@pl@ListEntry{mediawidth}%
        \ZREF@pl@ListEntry{mediaheight}%
        \ZREF@pl@ListEntry{pdfpagewidth}%
        \ZREF@pl@ListEntry{pdfpageheight}%
        \ZREF@pl@ListEntry{pdfhorigin}%
        \ZREF@pl@ListEntry{pdfvorigin}%
        \ZREF@pl@ListEntry{hoffset}%
        \ZREF@pl@ListEntry{voffset}%
        \ZREF@pl@ListEntry{topmargin}%
        \ZREF@pl@ListEntry{oddsidemargin}%
        \ZREF@pl@ListEntry{evensidemargin}%
        \ZREF@pl@ListEntry{textwidth}%
        \ZREF@pl@ListEntry{textheight}%
        \ZREF@pl@ListEntry{headheight}%
        \ZREF@pl@ListEntry{headsep}%
        \ZREF@pl@ListEntry{footskip}%
        \ZREF@pl@ListEntry{marginparwidth}%
        \ZREF@pl@ListEntry{marginparsep}%
        \ZREF@pl@ListEntry{columnwidth}%
        \ZREF@pl@ListEntry{columnsep}%
        \ZREF@pl@ListEntry{trimedge}%
        \ZREF@pl@ListEntry{spinemargin}%
        \ZREF@pl@ListEntry{foremargin}%
        \ZREF@pl@ListEntry{trimtop}%
        \ZREF@pl@ListEntry{uppermargin}%
        \ZREF@pl@ListEntry{headmargin}%
      }%
    }%
  }\x
  \ifnum\ZREF@page@max>\count@
    \advance\count@ by\ltx@one
  \else
    \expandafter\ltx@gobble
  \fi
  \ZREF@pl@ListPage
}
\def\ZREF@pl@ListEntry#1{%
  \zref@ifpropundefined{#1}{%
  }{%
    \zref@ifrefcontainsprop{thepage\the\count@}{#1}{%
      \ltx@space\ltx@space#1 = %
      \zref@extract{thepage\the\count@}{#1}sp = %
      \the\dimexpr\zref@extract{thepage\the\count@}{#1}sp\relax
      \noexpand\MessageBreak
    }{}%
  }%
}
\AfterLastShipout{%
  \ZREF@pl@AfterLastShipout
}
%% \section{Installation}
\endinput
%%
%% End of file `zref-pagelayout.sty'.
